package RTL.Task3;

//综合测试
public class MainTest {

    public static void main(String[] args) {

        //初始化手机卡
        PhoneCard phoneCard = new PhoneCard();
        //输入显示信息
        phoneCard.setUserName("A先生");
        phoneCard.setPassword("123456");
        phoneCard.setBalance(100);
        phoneCard.setCardNumber("314823759");
        phoneCard.setCardType(CardTypeEnum.BIG);
        phoneCard.setTalkTime(300);
        phoneCard.setNetFlow(1000);
        //显示卡号用户名和当前余额
        phoneCard.show();

        System.out.println();

        // 流量套餐
        TalkService talkService = new TalkPackageServiceImpl();
        talkService.talk(60, phoneCard);

        Package abstractTalkPackage = new TalkPackageServiceImpl(10, 60, 100);
        abstractTalkPackage.show();

        System.out.println();
        // 通话套餐
        NetService netService = new NetPackageServiceImpl();
        netService.net(1000, phoneCard);


        Package abstractNetPackage = new NetPackageServiceImpl(50, 1000);
        abstractNetPackage.show();

        //用户消费统计
        System.out.println();
        UserConsumption userConsumption = new UserConsumption(50, 700, 60, 80);
        userConsumption.show();
    }
}
